You are here: Trading System Programming > Reference > Classes > TechnicalAnalysis > TechnicalAnalysis Methods > STDDEV

STDDEV

This method calculates the Standard Deviation.

 

Syntax

var STDDEV(period, deviation, dataArray, calculatedDataArray);

Parameters

period

Period integer value.

 

deviation

Deviation floating value.

 

dataArray

Array object filled with any data which will be used as the source for calculation.

 

calculatedDataArray

Empty Array object that will be filled with calculated data.

Return Value

Returns true if calculation was completed successfully, or false otherwise.

Example

The following example demonstrates how to use STDDEV method.

 

function calculate(beginIndex, endIndex)

{

var period = 15;

var deviation = 1.00;

 

var dataArray = new Array();

 

//populate data array..

..

 

var calculatedDataArray = new Array();

 

var rc = TechnicalAnalysis.STDDEV(period, deviation, dataArray, calculatedDataArray);

}

 

 


Copyright © 2006-2009 ActiveTick LLC